package com.sgb.zhaocai.entity;

import android.text.TextUtils;

import com.swgk.core.util.DateUtils;

import java.math.BigDecimal;

/**
 * Time:2021/7/2
 * AUTHOR:F_Q
 * Description:
 */
public class LeaseNeedListEntity {

    private String no;
    private String id;
    private String businessPlanId;
    private String type;
    private String unit;
    private String surplus;
    private String planUseTime;
    private String name;
    private String projectAddressName;
    private String projectId;
    private String spec;
    private String categoryName;
    private boolean offerState;
    private String offerCount;
    private String compNo;

    public String getCompNo() {
        return compNo;
    }

    public void setCompNo(String compNo) {
        this.compNo = compNo;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBusinessPlanId() {
        return businessPlanId;
    }

    public void setBusinessPlanId(String businessPlanId) {
        this.businessPlanId = businessPlanId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public boolean getOfferState() {
        return offerState;
    }

    public void setOfferState(boolean offerState) {
        this.offerState = offerState;
    }

    public String getOfferCount() {
        return offerCount;
    }

    public void setOfferCount(String offerCount) {
        this.offerCount = offerCount;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getSurplus() {
        if (!TextUtils.isEmpty(surplus)){
            BigDecimal big = new BigDecimal(surplus);
            big = big.stripTrailingZeros();
            return big.toPlainString();
        }else {
            return "";
        }
    }

    public void setSurplus(String surplus) {
        this.surplus = surplus;
    }

    public String getPlanUseTime() {
        if (!TextUtils.isEmpty(planUseTime)){
            String timestamp = DateUtils.timestampToDate(Long.parseLong(planUseTime));
            return timestamp;
        }else {
            return "";
        }
    }

    public void setPlanUseTime(String planUseTime) {
        this.planUseTime = planUseTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProjectAddressName() {
        if (!TextUtils.isEmpty(projectAddressName)){
            String replace = projectAddressName.replace("/", "");
            return replace.replace(" ","");
        }else {
            return "";
        }
    }

    public void setProjectAddressName(String projectAddressName) {
        this.projectAddressName = projectAddressName;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }
}
